﻿@model IEnumerable<Lucy.Models.Diamond>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Carat)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Clarity)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Color)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Shape)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Price)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Available)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Carat)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Clarity)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Color)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Shape)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Available)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.DiamondID }) |
            @Html.ActionLink("Details", "Details", new { id=item.DiamondID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.DiamondID })
        </td>
    </tr>
}

</table>
